function formatterDate(val) {
    return formatDate(val);
}
function formatterIsValid(val) {
    if(val==0){
        return "失效";
    }
    if(val==1){
        return "正常";
    }
}
function openAddSaleDrugDialog() {
    openDlg("dlg","药品销售");
}
function deleteSaleDrug() {
    deleteData("dg","http://localhost:8081/user/saleDrug/deleteSaleDrug",searchSaleDrugByParams);
}
function searchSaleDrugByParams() {
    $("#dg").datagrid("load",{
        saleId:$("#saleId").val(),
        drugId:$("#drugId").val()
    })
}
function saveSaleDrug() {
    saveOrUpdate("fm","http://localhost:8081/user/saleDrug/saveSaleDrug","dlg",searchSaleDrugByParams);
}
function closeSaleDrugDlg() {
    initFormData("dlg")
    closeDlgData("dlg");
}